$(function(){
	var swiper = new Swiper('.swiper-container', {
      slidesPerView: 2.2,
      spaceBetween: 15,
    });
    var swipers = new Swiper('.pr_htW', {
      direction: 'vertical',
      slidesPerView: 1,
       autoplay: {
        delay: 2500,
        disableOnInteraction: false,
      },
    });
	 // 基于准备好的dom，初始化echarts实例
	var option = {
	    animation: false,
	    color:['#EA6666', '#F7C541','#F8E540','#A2E66A','#7AC979','#76E4DE',' #5792D7','#A56ADA'],
	    // 图例设置
	    legend: {
	        orient: 'vertical',
	        x: 'right',
	       // 数据渲染
	        data:['代币销售','aaa','bbb','ccc','ddd','111','222','333'],
	        textStyle: {fontSize: '0.6rem'},
	        itemGap: 3,
	        // z:2,
	        height:'auto',
	        width:25,
	        itemWidth: 20,
	        itemHeight: 18,
	        right:20
	    },
	    // 饼图设置
	    series: [
	        {
	            name:'货币',
	            type:'pie',
	            radius: ['30', '45'],
	            center:['72','47'],
	            avoidLabelOverlap: false,
	            label: {
	                normal: {
	                	show: false,
	                    position: 'center',
	                },
	                emphasis: {
	                    show: true,
	                    textStyle: {
	                        fontSize: '6rem',
	                    }
	                }
	            },
	            labelLine: {
	                normal: {
	                    show: false
	                }
	            },
	            // 数据渲染
	            data:[
	                {value:335, name:'代币销售'},
	               	{value:1335, name:'aaa'},
	                {value:335, name:'bbb'},
	                {value:335, name:'ccc'},
	                {value:335, name:'ddd'},
	                {value:335, name:'111'},
	                {value:335, name:'222'},
	                {value:335, name:'333'},
	            ]
	        }
	    ]
	};
    var container = document.getElementById('pie');
    if(option.series[0].data.length <= 4){
    	option.series[0].data.length = 4
    }
    container.style.height = option.series[0].data.length*1.1+'rem';
    var myChart = echarts.init(container);
	myChart.setOption(option);
	 // tab切换 
  	$(".tablea").find(".box:first").show();    //为每个BOX的第一个元素显示        
  	$("#oranger p").on("mouseover",function(){ //给a标签添加事件  
    var index=$(this).index();  //获取当前a标签的个数  
    $(this).parent().next().find(".box").hide().eq(index).show(); //返回上一层，在下面查找css名为box隐藏，然后选中的显示  
    // $(this).addClass("hover").siblings().removeClass("hover"); 
    $(this).children().find(".pr_hover").css('display','block')
    // $('.pr_hover').css('display','block')
	}) 
})